# Windows System Firmware Flashing Guide

## File Description
- **AFUWINx64.exe**: AMI Windows Firmware Flashing Tool (64-bit)
- **AfuEfix64_5.14.02.0026.efi**: EFI Environment Firmware Flashing Tool
- **Phx20HDF723007_SER7_P5C8V07_20240724172202_SetupIommu.bin**: Target Firmware File
- **Flash.nsh**: EFI Environment Automatic Flashing Script
- **EFI/**: EFI Boot Related Files

---

## Windows System Flashing Method (Recommended)

### Method 1: Using AFUWINx64.exe (Graphical Interface)

#### Steps:
1. **Run as Administrator**
   - Right-click on `AFUWINx64.exe`
   - Select "Run as administrator"

2. **Load Firmware File**
   - Click the "Open" button
   - Choose `Phx20HDF723007_SER7_P5C8V07_20240724172202_SetupIommu.bin`

3. **Configure Options** (Recommended Settings)
   - ✅ Check "Preserve all NVRAM data" (Preserve NVRAM data, /p parameter)
   - ✅ Check "Do not restart after flash update" (Do not restart after flashing, /n parameter)
   - ✅ Check "Preserve PXE boot code" (Preserve PXE boot code, /k parameter)

4. **Start Flashing**
   - Click the "Flash" button
   - Wait for the progress bar to complete (usually takes 2-5 minutes)
   - After successful flashing, it will prompt "Update successful"

5. **Restart the System**
   - Manually restart the computer
   - Enter BIOS settings to confirm the firmware version has been updated

---

### Method 2: Using Command Line (For Advanced Users)

#### Command Format:
```cmd
AFUWINx64.exe <Firmware File Path> /p /b /n /k
```

#### Parameter Description:
- `/p` - Preserve: Preserve NVRAM data (Recommended)
- `/b` - Backup: Backup current firmware before flashing
- `/n` - No reboot: Do not restart immediately after flashing
- `/k` - Keep PXE: Preserve PXE boot code

#### Execution Steps:
1. **Open Command Prompt (CMD) or PowerShell as Administrator**

2. **Enter Firmware Folder**
   ```cmd
   cd "c:\Users\M\Desktop\SER7 LK_V07"
   ```

3. **Execute Flashing Command**
   ```cmd
   AFUWINx64.exe Phx20HDF723007_SER7_P5C8V07_20240724172202_SetupIommu.bin /p /b /n /k
   ```

4. **Wait for Completion and Manually Restart**

---

## Notes

### ⚠️ Important Warnings:
1. **Ensure Stable Power Supply**: Do not power off or force shutdown during flashing
2. **Close All Programs**: Close antivirus software and other running programs before flashing
3. **Backup Important Data**: Although the tool will backup current firmware, it is recommended to back up important data in advance
4. **Confirm Firmware Version**: Make sure the downloaded firmware is completely compatible with your hardware model

### 🔒 Security Recommendations:
- Use a stable power supply (Connect to a power adapter for laptops)
- Avoid operation during thunderstorms or bad weather
- Confirm that Secure Boot Flash protection is disabled in BIOS settings

---

## Troubleshooting

### Common Issues:

**Q1: Prompt "Access Denied" or insufficient permission**
- Solution: Must run CMD as administrator or right-click and run the exe as administrator

**Q2: Prompt "Secure Boot Flash is enabled"**
- Solution: Need to enter BIOS first and disable the Secure Boot Flash option

**Q3: Flashing process gets stuck**
- Solution: Wait for 10 minutes, if no response, consider forced restart (Has risk)

**Q4: Flashing fails with error code**
- Check AMI official documentation or contact technical support
- Try using the /b parameter to backup first and then re-flash